package work;

/**
 * @TODO
 * @Author xu
 * 2025/2/24
 */

import java.util.Scanner;
public class Day3_2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入学员的考试成绩：");
        int score = scanner.nextInt();
        String grade = calculateGrade(score);
        System.out.println("学员的考试成绩级别：" + grade);
    }

    private static String calculateGrade(int score) {
        if (score == 100) {
            return "A级";
        } else if (score >= 90) {
            return "A级";
        } else if (score >= 80) {
            return "B级";
        } else if (score >= 70) {
            return "C级";
        } else if (score >= 60) {
            return "D级";
        } else {
            return "不合格";
        }

    }
}